from langchain_community.document_loaders import Docx2txtLoader

class ChatDoc():

    def getFile():
        # 读取文件
        loader = Docx2txtLoader("file/若依环境使用手册.docx")
        text = loader.load()
        return text


data = ChatDoc.getFile()
print(data)